package com.yizhuoyan.his.webapi.controller.doctor.outpatient.vo;

import com.yizhuoyan.his.entity.DocPrescriptionDetailEntity;
import com.yizhuoyan.his.entity.DocPrescriptionEntity;
import lombok.Data;

/**
 * 中成药处方详情
 * @author 徐世杰
 */
@Data
public class DocPrescriptionDetailVo {
    //用法
    private String usageWay;
    //用量
    private String dosage;
    //频次
    private String frequency;
    //数量
    private double amount;
    //状态
    private int state;

    public static DocPrescriptionDetailVo of(DocPrescriptionDetailEntity entity)throws Exception{
        DocPrescriptionDetailVo vo=new DocPrescriptionDetailVo();
        vo.setAmount(entity.getAmount());
        vo.setDosage(entity.getDosage());
        vo.setFrequency(entity.getFrequency());
        vo.setState(entity.getState());
        vo.setUsageWay(entity.getUsageWay());
        return vo;
    }
}
